Skip to content

Replace manifest upload with zip import, add webApplicationInfo flags#2752

Merged
heyitsaamir merged 2 commits intomainfrom
fix/manifest-upload-zip-import-and-webappinfo
Apr 17, 2026
Merged

Replace manifest upload with zip import, add webApplicationInfo flags#2752
heyitsaamir merged 2 commits intomainfrom
fix/manifest-upload-zip-import-and-webappinfo

Conversation

@heyitsaamir
Copy link
Copy Markdown
Collaborator

Summary

  • Delete manifestToAppDetails() — replaced manifest upload with TDP's zip import endpoint (/appdefinitions/v2/import?overwriteIfAppAlreadyExists=true). The backend handles all manifest-to-definition mapping, fixing the bug where webApplicationInfo.resource (and many other fields) were silently dropped.
  • Add --web-app-info-id / --web-app-info-resource flags to teams app update for directly editing webApplicationInfo without a full manifest upload.
  • Auto version bumping on teams app manifest upload — when manifest version matches server but content changed, patch version is auto-bumped (opt out with --no-bump-version).

Test plan

  • npm run build compiles cleanly
  • npm run test — 86 tests pass (24 new: version utilities, zip import, webApplicationInfo validation)
  • Integration: teams app update <id> --web-app-info-id <id> --web-app-info-resource api://botid-<id> → doctor confirms webApplicationInfo configured => pass
  • Integration: teams app manifest upload manifest.json <id>webApplicationInfo.resource persists on server (verified via download)
  • Integration: upload with content change → version auto-bumped 1.0.01.0.1
  • Integration: --no-bump-version → version stays the same
  • Integration: 5 fields changed in one upload → single version bump (1.0.11.0.2)

🤖 Generated with Claude Code

…, auto version bump

The CLI's manifestToAppDetails() was silently dropping fields (most critically
webApplicationInfo.resource, breaking SSO). Instead of patching the mapping,
this eliminates it entirely by using TDP's zip import endpoint — the backend
handles all manifest-to-definition mapping, so no fields are lost.

Also adds --web-app-info-id / --web-app-info-resource flags to `teams app update`
and automatic patch version bumping on manifest upload when content changes.

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reworks Teams app manifest upload to use TDP zip import (so manifest fields aren’t dropped), adds teams app update flags for webApplicationInfo, and introduces auto patch-version bumping when uploading changed manifests with unchanged versions.

Changes:

  • Switch manifest upload to download existing package → replace manifest.json → import zip with overwrite.
  • Add --web-app-info-id / --web-app-info-resource options to teams app update.
  • Add version utilities + tests and implement optional auto patch bumping on manifest upload (--no-bump-version to disable).

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
teams.md/docs/cli/commands/app/update.md Documents new app update flags (version, icons, webApplicationInfo, json).
teams.md/docs/cli/commands/app/manifest-upload.md Documents zip import behavior + --no-bump-version and version bump rules.
packages/cli/tests/web-app-info-update.test.ts Adds offline validation tests for new webApplicationInfo flags.
packages/cli/tests/version.test.ts Adds unit tests for version compare/bump helpers.
packages/cli/tests/manifest-upload-zip.test.ts Adds tests verifying zip import + icon preservation behavior.
packages/cli/src/utils/version.ts Introduces bumpPatchVersion and compareVersions.
packages/cli/src/commands/app/update.ts Implements new webApplicationInfo flags + validation + update payload mapping.
packages/cli/src/commands/app/manifest/upload.ts Adds --no-bump-version flag and returns bumped version info in JSON output.
packages/cli/src/commands/app/manifest/actions.ts Implements zip-import upload call path + optional auto version bump logic.
packages/cli/src/apps/tdp.ts Extends importAppPackage to support overwrite query parameter.
packages/cli/src/apps/api.ts Replaces manifest upload implementation with zip download/modify/import flow.

Comment thread packages/cli/src/commands/app/manifest/actions.ts
Comment thread packages/cli/src/commands/app/update.ts Outdated
Comment thread packages/cli/src/utils/version.ts Outdated
Comment thread packages/cli/src/utils/version.ts
Comment thread packages/cli/tests/web-app-info-update.test.ts Outdated
Comment thread packages/cli/src/apps/api.ts Outdated
Comment thread packages/cli/src/commands/app/manifest/actions.ts Outdated
…safety

- Only fall back to default zip on 404 in uploadManifest (not any error)
- Use stable sorted-key stringify for manifest comparison
- Make UploadResult.version optional to match runtime behavior
- Add api:// prefix validation for --web-app-info-resource
- Fix compareVersions to reject malformed versions (empty segments)
- Add JsonErrorResponse interface and remove Record casts in tests
- Update bumpPatchVersion docstring for accuracy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@heyitsaamir heyitsaamir merged commit 802a639 into main Apr 17, 2026
3 checks passed
@heyitsaamir heyitsaamir deleted the fix/manifest-upload-zip-import-and-webappinfo branch April 17, 2026 15:32
@heyitsaamir heyitsaamir mentioned this pull request Apr 17, 2026
3 tasks
heyitsaamir added a commit that referenced this pull request Apr 17, 2026
## Summary
- Merge main into preview for 2.1-preview release
- Includes: zip-based manifest import with webApplicationInfo flags
(#2752), teams-dev agent skill and plugin marketplace (#2750), teams-dev
skill docs (#2747)

## Checklist
- [x] CLI builds cleanly
- [x] All tests pass (11 suites, 89 tests)
- [x] version.json set to `2.1-preview.{height}`

After merge, trigger the publish pipeline on `preview` with **Public**
publish type.

---------

Co-authored-by: Kavin <115390646+singhk97@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
heyitsaamir added a commit that referenced this pull request Apr 17, 2026
## Summary
- Merge main into preview for 2.1-preview release, including post-merge
fixes
- New since #2755: Fix manifest-upload-zip test on Windows (#2756), fix
teams-dev skill patterns (#2753)

## What's included
- #2752 — Replace manifest upload with zip import, add
webApplicationInfo flags
- #2753 — Fix teams-dev skill: remove wrong patterns, link to llms.txt
- #2756 — Fix manifest-upload-zip test on Windows
- #2750 — Add teams-dev agent skill and plugin marketplace config
- #2747 — Add teams-dev skill documentation

## Checklist
- [x] CLI builds cleanly
- [x] All tests pass (11 suites, 89 tests)
- [x] version.json set to `2.1-preview.{height}`

After merge, trigger the publish pipeline on `preview` with **Public**
publish type.

---------

Co-authored-by: Kavin <115390646+singhk97@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants